FROM ubuntu AS base
RUN sed -i s:/archive.ubuntu.com:/mirrors.volces.com/ubuntu:g /etc/apt/sources.list
RUN apt-get update && \
    apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common && \
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \
    add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" && \
    apt-get update && apt-get install -y docker-ce docker-ce-cli containerd.io nodejs npm git && apt-get clean && \
    npm config set registry https://registry.npmmirror.com